n = 4
matrix = [[0] * i for i in range(n,0,-1)]

for i in range(n):
    k = i * (i+1) // 2 + 1
    for t in range(i+1):
        matrix[i-t][t] = k + t

for i in range(n):
    print(' '.join(map(str, matrix[i])))